// 配置文件引过来 遍历
import routerConfig from './routerConfig'
const Router = require('koa-router');
//请求接口统一加了前缀
const router = new Router();
routerConfig.forEach(item => {
  const cb = router[item.method.toLowerCase()]; //router['get']
  cb.call(router, item.url, item.callback.bind(router));
})
export default router;